import request from '@/utils/request'

const prefix = '/merchant/withdraw/money/v1/'

// 查询提现列表
export function getList(params) {
  return request({
    url: `/merchant/withdraw/money/v1`,
    method: 'get',
    params
  })
}

// 提现详情
export function getDetail(params) {
  return request({
    url: `${prefix}details`,
    method: 'get',
    params
  })
}

// 同意
export function agree(params) {
  return request({
    url: `${prefix}agree`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}

// 驳回
export function reject(params) {
  return request({
    url: `${prefix}reject`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
